import request from '../../utils/request'

const vip = {
    // 获取全部
    getAllVipApi(params) {
        return request({
            url: "/member/getAllMembers",
            method: "GET",
            params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })
    },
    // 分页获取全部
    getVipByLimit(params) {
        return request({
            url: "/member/getAllMembers",
            method: "GET",
            params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })
    },
    // 查询
    getVipByType(params) {
        return request({
            url: "/member/getAllMembers",
            method: "GET",
            params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })
    },
    // getVipById(params) {
    //     return request({
    //         url: "/member/getAllMembersById",
    //         method: "GET",
    //         params
    //     })
    // },
    // 删除
    deleVipById(params) {
        return request({
            url: "/member/delMember",
            method: "POST",
            data: params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })
    },
    // 充值会员
    updateVip(params){
        return request({
            url:"/member/updateMemberToVip",
            method:"POST",
            data:params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })
    },
    //取消会员
    cancleVip(params){
        return request({
            url:"/member/cancleMember",
            method:"POST",
            data:params,
            headers:{'Authorization':window.localStorage.getItem('token')}
        })

    }
}
export default vip
